package com.xdjmall.entity;

import java.math.BigDecimal;
import java.time.LocalDate;

//订单项
public class OrderItem {
    //订单关联购物项主键id
    private Integer orderItemId;
    //订单主键id
    private Integer orderId;
    //关联商品id
    private Integer goodsId;
    //下单时商品的名称(订单快照)
    private String goodsName;
    //下单时商品的主图(订单快照)
    private String goodsCoverImg;
    //下单时商品的价格(订单快照)
    private BigDecimal sellingPrice;
    //数量(订单快照)
    private Integer goodsCount;
    //创建时间
    private LocalDate createTime;
    
	public OrderItem() {
		super();
	}

	public OrderItem(Integer orderId,Integer goodsId,String goodsName,String goodsCoverImg,
			BigDecimal sellingPrice,Integer goodsCount) {
		this.orderId = orderId;
		this.goodsId = goodsId;
		this.goodsName = goodsName;
		this.goodsCoverImg = goodsCoverImg;
		this.sellingPrice = sellingPrice;
		this.goodsCount = goodsCount;
	}
	
	public Integer getOrderItemId() {
		return orderItemId;
	}
	public void setOrderItemId(Integer orderItemId) {
		this.orderItemId = orderItemId;
	}
	public Integer getOrderId() {
		return orderId;
	}
	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}
	public Integer getGoodsId() {
		return goodsId;
	}
	public void setGoodsId(Integer goodsId) {
		this.goodsId = goodsId;
	}
	public String getGoodsName() {
		return goodsName;
	}
	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}
	public String getGoodsCoverImg() {
		return goodsCoverImg;
	}
	public void setGoodsCoverImg(String goodsCoverImg) {
		this.goodsCoverImg = goodsCoverImg;
	}
	public BigDecimal getSellingPrice() {
		return sellingPrice;
	}
	public void setSellingPrice(BigDecimal sellingPrice) {
		this.sellingPrice = sellingPrice;
	}
	public Integer getGoodsCount() {
		return goodsCount;
	}
	public void setGoodsCount(Integer goodsCount) {
		this.goodsCount = goodsCount;
	}
	public LocalDate getCreateTime() {
		return createTime;
	}
	public void setCreateTime(LocalDate createTime) {
		this.createTime = createTime;
	}
	@Override
	public String toString() {
		return "OrderItem [orderItemId=" + orderItemId + ", orderId=" + orderId + ", goodsId=" + goodsId
				+ ", goodsName=" + goodsName + ", goodsCoverImg=" + goodsCoverImg + ", sellingPrice=" + sellingPrice
				+ ", goodsCount=" + goodsCount + ", createTime=" + createTime + "]";
	}
}